﻿
<%@ Page Language="C#" AutoEventWireup="false" Inherits="Bee.Web.BeePageView"  %>
<%@ Import Namespace="Bee.Web" %>
<%@ Import Namespace="Bee" %>
<%@ Import Namespace="System.Collections.Generic" %>

<% System.Data.DataTable dataTable = Model as System.Data.DataTable;  %>
<div class="pageHeader">
    <form id="pageForm<%=PageId %>" action="<%=HtmlHelper.ForActionLink("list") %>" method="post" class="required-validate" >
    <input type='hidden' name='pageNum' value='<%=ViewData["pageNum"] %>' />
    <input type='hidden' name='pageSize' value='<%=ViewData["pageSize"] %>' />
    <input type='hidden' name='orderField' value='<%=ViewData["orderField"] %>' />
    <input type='hidden' name='orderDirection' value='<%=ViewData["orderDirection"] %>' />
    <input type='hidden' name='recordCount' value='<%=ViewData["recordCount"] %>' />
    <div class="searchBar">
        <ul class="searchContent">
            <%=HtmlHelper.AutoSearchInfo%>
        </ul>
    </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="/AuthRole/Show.bee?id=-1" target="dialog"  mask="true" title="创建" rel="CD<%=PageId %>"><span>添加</span></a></li>
            
        </ul>
        <ul class="searchBar">
            <li> <a class="button" href="javascript:" onclick="javascript:autoList();"><span>检索</span> </a></li>
        </ul>
    </div>
    <table id="table<%=PageId %>" class="table" width="1000" layouth="123">
        <thead>
        
                    <th width='25'><input type='checkbox' group='ids' class='checkboxCtrl'></th>
            <%= HtmlHelper.AutoHeaderInfo%>
                
                <th width='240'>操作</th>
        </thead>
        <tbody>
        <%
            if(dataTable != null)
            {
            foreach (System.Data.DataRow row in dataTable.Rows)
            {%>
            <tr>
				<td><input name='ids' value='<%=row[0] %>' type='checkbox'></td>
				<%
                    foreach (System.Data.DataColumn column in dataTable.Columns)
				{
				 %>
				 <td><%=HtmlHelper.AutoFormatRowItem(row, column.ColumnName)%></td>
				 <%} %>
				 
				 <td>
					<a title='删除' target='ajaxTodo' href='/AuthRole/Delete.bee?id=<%=row[0].ToString() %>' class='btnDel'>删除</a>					
					<a title='编辑' target="dialog"  mask="true" rel="CD<%=PageId %>" href='/AuthRole/Show.bee?id=<%=row[0].ToString() %>' class='btnEdit'>编辑</a>
					<a title='编辑权限--<%=row["Name"] %>' target="navTab"  mask="true" rel="CD<%=PageId %>" href='/AuthRole/ShowPermission.bee?id=<%=row[0].ToString() %>' class="button"><span>编辑权限</span></a>
					
<%--					<a title='查看人员--<%=row["Name"] %>' target="navTab"  mask="true" rel="CD<%=PageId %>" href='/AuthRole/ShowUser.bee?id=<%=row[0].ToString() %>' class="button"><span>查看人员</span></a>--%>
				</td>
			</tr>
			<%}} %>
        </tbody>
    </table>;
    <div class='panelBar'>
        <div class='pages'>
            <span>显示</span>
            <select class='combox' name='numPerPage' onchange="javascript:autoChangePageSize(this);">
                <%=HtmlHelper.ForPageSizeSelect() %>
            </select>
            <span>条，共<%=ViewData["recordcount"] %>条</span>
        </div>
        <div class='pagination' totalcount='<%=ViewData["recordCount"] %>' numperpage='<%=ViewData["pagesize"] %>' pagenumshown='10'
            currentpage='<%=ViewData["pagenum"] %>'>
        </div>
    </div>
</div>
